package cn.hls.entity;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

/**
 * @fileName: GPSWarn.java
 * @package: cn.hls.entity 　*@Description: GPS预警信息 　*@author: yinghui.zhang
 *           　*@email: uuhui@163.com
 * @date: 2016年11月15日
 * 
 */
@Table(name = "t_gps_warn_handle")
@Entity
@DynamicInsert
@DynamicUpdate
public class GPSWarnHandle extends BaseEntity {
	private static final long serialVersionUID = 1L;
	private GPSWarn gpsWarn;// 预警对象
	private String handleType;// 处理方式
	private String handleContent;// 处理内容
	private Date handleTime;// 处理时间
	private String operator;// 操作人员

	@ManyToOne(cascade = CascadeType.REFRESH)
	@NotFound(action = NotFoundAction.IGNORE)
	@JoinColumn(name = "warn_id")
	public GPSWarn getGpsWarn() {
		return gpsWarn;
	}

	public void setGpsWarn(GPSWarn gpsWarn) {
		this.gpsWarn = gpsWarn;
	}

	@Column(name="handle_type",length=32)
	public String getHandleType() {
		return handleType;
	}

	public void setHandleType(String handleType) {
		this.handleType = handleType;
	}

	@Column(name="handle_content",length=255)
	public String getHandleContent() {
		return handleContent;
	}

	public void setHandleContent(String handleContent) {
		this.handleContent = handleContent;
	}
	
	@Column(name="handle_time")
	public Date getHandleTime() {
		return handleTime;
	}

	public void setHandleTime(Date handleTime) {
		this.handleTime = handleTime;
	}

	@Column(name = "operator", length = 16)
	public String getOperator() {
		return operator;
	}

	public void setOperator(String operator) {
		this.operator = operator;
	}
}